/*
 * Iparelan Annotations Utilities
 * This file is part of Pattern Notes.
 * Copyright (c) 2008, Iparelan Solutions, LLC. All rights reserved.
 *
 * Pattern Notes is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Pattern Notes is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with Pattern Notes. If not, see <http://www.gnu.org/licenses/>.
 */

package com.iparelan.annotations.patterns;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.iparelan.annotations.Copyright;

/**
 * Marks a class as implementing the Abstract Factory pattern.
 *
 * <p><em>Service loader</em> style factories conceptually "implement" the
 * associated {@code FactoryInterface} of the factory's package with {@code
 * static} methods. The factory delegates object instantiation to a concrete
 * factory implementation. The concrete factory dependency is resolved by
 * loading a service configured in a <em>registry</em> found in the resource
 * directory <code>META-INF/services</code> with a file name that is the
 * binary name of the associated {@code FactoryInterface}. The resource file
 * names a <em>plugin</em> that implements the factory.
 *
 * @see <nobr><a href="http://martinfowler.com/articles/injection.html">"Inversion of Control Containers and the Dependency Injection Pattern," Martin Fowler</a></nobr>
 * @see <nobr><a href="http://c2.com/cgi/wiki?DesignPatternsBook">"Design Patterns,"</a> Erich Gamma, et. al., "Abstract Factory"</nobr>
 * @see <nobr><a href="http://martinfowler.com/books.html#eaa">"Patterns of Enterprise Application Architecture,"</a> Martin Fowler, "Plugin"</nobr>
 *
 * @author Greg Mattes
 * @version July 2008
 */
@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
@Copyright("Copyright &copy; 2008, Iparelan Solutions, LLC. All rights reserved.")
public @interface Factory {
}
